package org.wdcode.back.po;

import java.io.Serializable;

import org.wdcode.back.helper.GroupHelper;
import org.wdcode.common.util.CommonUtil;

/**
 * 属性分类实体
 * @author WD
 * @since JDK6
 * @version 1.0 2009-11-23
 */
public final class Sort extends BaseBackStateEntityBean implements Serializable {
	// 序列化ID
	private static final long	serialVersionUID	= 1122269727902365692L;

	// 分组ID
	private Integer				groupId;
	// 分组实体
	private Group				group;

	/**
	 * 获得分组ID
	 * @return 分组ID
	 */
	public Integer getGroupId() {
		return groupId;
	}

	/**
	 * 设置分组ID
	 * @param groupId 分组ID
	 */
	public void setGroupId(Integer groupId) {
		this.groupId = groupId;
	}

	/**
	 * 获得分组实体
	 * @return 分组实体
	 */
	public Group getGroup() {
		return CommonUtil.isEmpty(group) ? group = GroupHelper.getHelper().get(groupId) : group;
	}
}
